Skip to content

Ensure Ray shutdown between tests, remove deprecated imports, and update README#13

Open
MayarMAhmed wants to merge 7 commits intomainfrom
10-povme-killed
Open

Ensure Ray shutdown between tests, remove deprecated imports, and update README#13
MayarMAhmed wants to merge 7 commits intomainfrom
10-povme-killed

Conversation

@MayarMAhmed
Copy link
Member

@MayarMAhmed MayarMAhmed commented Mar 11, 2026

This PR tightens Ray cleanup in the test suite, removes deprecated typing imports in favor of collections.abc, and restructures the README for clarity.

All existing tests pass.

Motivation

The previous conftest.py shut down Ray once at session end via pytest_sessionfinish. This works, but if a test leaves a Ray context running, every subsequent test inherits that state. Moving shutdown to a per-test autouse fixture is a low-cost sanity measure that ensures each test starts with a clean slate.

Separately, Python 3.9+ moved Generator and other generic types into collections.abc, and importing them from typing has been deprecated since Python 3.11. These imports produced DeprecatedSince211 warnings.

The README also needed restructuring: the Development section appeared before Installation (confusing for new users), several sentences were incomplete or had typos, and section headings were inconsistent.

Changes by file

tests/conftest.py — Ray lifecycle management

Change Detail
Replace session-level shutdown with per-test fixture Removes pytest_sessionfinish hook; adds autouse=True shutdown_ray_after_test fixture that yields, then calls ray.shutdown() if Ray is initialized. Ensures each test starts with a clean Ray state.

povme/parallel.py — Deprecated import cleanup + guardrail

Change Detail
Move Generator import typing.Generatorcollections.abc.Generator
Add n_cores warning Logs a warning when n_cores > 1 but use_ray is False, since tasks will run sequentially regardless

povme/pocket/volume.py — Deprecated import cleanup

Change Detail
Move Generator import typing.Generatorcollections.abc.Generator

README.md — Restructure and complete

Change Detail
Reorder sections Move Development below Installation so users see setup instructions first
Rename subheadings "Development" → "Latest development version", "Tagged" → "Tagged version" under Installation
Update install instructions Replace pip install . with pixi install; add pixi shell activation step
Add tagged-version deps Add conda create block for legacy v2.2.2 installs that don't have a pixi.toml
Add usage examples Complete the dangling "To use povme" sentence; add POVME2.py usage and --test flag for tagged versions
Fix typos and grammar "runnning" → "running", "environment include" → "environment includes", add missing colons and commas

pixi.lock — Regenerated to reflect dependency changes from #12.

@MayarMAhmed MayarMAhmed requested a review from a team as a code owner March 11, 2026 13:27
@MayarMAhmed MayarMAhmed linked an issue Mar 11, 2026 that may be closed by this pull request
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 78.98%. Comparing base (0567210) to head (f0fe281).

Files with missing lines Patch % Lines
povme/parallel.py 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #13      +/-   ##
==========================================
- Coverage   79.01%   78.98%   -0.04%     
==========================================
  Files          15       15              
  Lines        1158     1161       +3     
  Branches      162      163       +1     
==========================================
+ Hits          915      917       +2     
  Misses        180      180              
- Partials       63       64       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot Install POVME2 povme detect gets killed during "Adding points" for CNR1 (472 residues)

2 participants